/*************************************************************************
    > File Name: client.cpp
    > Author: Lancer
    > Mail: 18826075768@163.com
************************************************************************/

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

#define P_FIFO "/tmp/p_fifo"

using namespace std;

int main(int argc, char** argv){
    int fd;
    if(argc < 2){
        printf("please input the write data!");
        return 1;
    }
    fd = open(P_FIFO, O_WRONLY | O_NONBLOCK);
    write(fd, argv[1], 100);
    close(fd);
    return 0;
}